package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RefundMapper;
import com.ruoyi.system.domain.Refund;
import com.ruoyi.system.service.IRefundService;

/**
 * refundService业务层处理
 * 
 * @author 墨染
 * @date 2025-01-09
 */
@Service
public class RefundServiceImpl implements IRefundService 
{
    @Autowired
    private RefundMapper refundMapper;

    /**
     * 查询refund
     * 
     * @param refundId refund主键
     * @return refund
     */
    @Override
    public Refund selectRefundByRefundId(Long refundId)
    {
        return refundMapper.selectRefundByRefundId(refundId);
    }

    /**
     * 查询refund列表
     * 
     * @param refund refund
     * @return refund
     */
    @Override
    public List<Refund> selectRefundList(Refund refund)
    {
        return refundMapper.selectRefundList(refund);
    }

    /**
     * 新增refund
     * 
     * @param refund refund
     * @return 结果
     */
    @Override
    public int insertRefund(Refund refund)
    {
        refund.setCreateTime(DateUtils.getNowDate());
        return refundMapper.insertRefund(refund);
    }

    /**
     * 修改refund
     * 
     * @param refund refund
     * @return 结果
     */
    @Override
    public int updateRefund(Refund refund)
    {
        refund.setUpdateTime(DateUtils.getNowDate());
        return refundMapper.updateRefund(refund);
    }

    /**
     * 批量删除refund
     * 
     * @param refundIds 需要删除的refund主键
     * @return 结果
     */
    @Override
    public int deleteRefundByRefundIds(Long[] refundIds)
    {
        return refundMapper.deleteRefundByRefundIds(refundIds);
    }

    /**
     * 删除refund信息
     * 
     * @param refundId refund主键
     * @return 结果
     */
    @Override
    public int deleteRefundByRefundId(Long refundId)
    {
        return refundMapper.deleteRefundByRefundId(refundId);
    }
}
